package org.kardigen.lg.admin.client;

import org.kardigen.lg.admin.client.training.TrainingsEditorView;
import org.kardigen.lg.admin.client.training.TrainingsEditorViewPresenter;
import org.kardigen.lg.admin.client.training.TrainingsView;
import org.kardigen.lg.admin.client.training.TrainingsViewPresenter;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.event.shared.SimpleEventBus;
import com.google.gwt.user.client.ui.RootPanel;

public class AdminEntryPoint implements EntryPoint {

	public void onModuleLoad() {

		RootPanel treePanel = RootPanel.get("tree");
		SimpleEventBus eventBus = new SimpleEventBus();

		TrainingsView view = new TrainingsView();
		treePanel.add(view);

		TrainingsViewPresenter presenter = new TrainingsViewPresenter(view);
		presenter.start(eventBus);

		RootPanel contentPanel = RootPanel.get("content");

		TrainingsEditorView editorView = new TrainingsEditorView();
		TrainingsEditorViewPresenter editorViewPresenter = new TrainingsEditorViewPresenter(editorView, eventBus);
		contentPanel.add(editorView);
	}


}
